//
//  YancheToolbarTableViewCell.m
//  CarTown
//
//  Created by xionghao on 15/8/27.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "YancheToolbarTableViewCell.h"

@implementation YancheToolbarTableViewCell

- (void)awakeFromNib {
    // Initialization code
    UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(yanclick)];
    
    self.YancheView.userInteractionEnabled=YES;
    [self.YancheView addGestureRecognizer:tap];
}
- (IBAction)btnclick:(UIButton *)sender {
    [self clickWithIndex:sender.tag];
}
-(void)yanclick{
    [self clickWithIndex:0];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)clickWithIndex:(NSInteger)index{
    if ([_delegate respondsToSelector:@selector(YanTabbarClickWithIndex:)]) {
        [_delegate YanTabbarClickWithIndex:index];
    }

}
@end
